import React from 'react'
import Item from './components/Item'
export default class App extends React.Component {
  state = {
    list: [
      { id: 1, name: 'jack', content: 'rose, you jump i jump' },
      { id: 2, name: 'rose', content: 'jack, you see you, one day day' },
      { id: 3, name: 'tom', content: 'jack,。。。。。' },
    ],
  }
  render() {
    return (
      <ul>
        {/* 使用组件的代码写在哪里,组件的结构就渲染在哪里 */}
        {this.state.list.map((data) => {
          // props传递数据
          return <Item key={data.id} xxx={data} yyy={123}></Item>
        })}
      </ul>
    )
  }
}
